setterm: avoid restoring flags from uninitialized memory
authorChris Hofstaedtler <zeha@debian.org>
Mon, 30 Oct 2023 21:59:33 +0000 (22:59 +0100)
committerChris Hofstaedtler <zeha@debian.org>
Mon, 30 Oct 2023 22:02:25 +0000 (23:02 +0100)
commit28ff65aff1e84e7badd956e2b2e71c5c058f5231
tree6ff0691ab2df6c3c2f0cde33537266a8fedf20ba
parent3d6d25762cddcda17ee5c2814d91725a3e1b1bc8
setterm: avoid restoring flags from uninitialized memory

Depending on the used compiler and flags, previously either F_SETFL was called
with 0 or with a random value. Never with the intended previous flags.

Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Gbp-Pq: Topic debian
Gbp-Pq: Name setterm-resize-uninit-flags.patch
term-utils/setterm.c